<!--format: 1,普通文本，2，时间精度到time，3，时间精度到天，4，textarea， 5,图片小，6，图片中，7,图片大-->
<template>
  <div class="col-md-12 detail" v-if="item.isHidden===0&&item.format===5">
    <div class="row">
      <div class="col-sm-3">{{item.label}}:</div>
      <div class="col-sm-9">
        <img :src="item.value" alt="">
      </div>
    </div>
  </div>
  <div class="col-md-12 detail" v-else-if="item.isHidden===0&&item.format===4">
    <div class="row">
      <div class="col-sm-3">{{item.label}}</div>
      <div class="col-sm-9">
        <textarea name="" id="" rows="4"  readonly class="form-control" style="resize: none">{{item.value}}</textarea>
      </div>
    </div>
  </div>
  <div class="col-md-6 detail" v-else-if="item.isHidden===0">
    <div class="row">
      <div class="col-sm-3">{{item.label}}:</div>
      <div class="col-sm-9">
        <p v-if="item.format===2">{{item.value | timeFormat}}</p>
        <p v-else-if="item.format===3">{{item.value | dateFormat}}</p>
        <p v-else>{{item.value}}</p>
      </div>
    </div>
  </div>
</template>
<script>
  import dateUtil from 'src/components/util/date-format';
  export default{
    props:{
      item:{}
    },
    filters: {
      timeFormat(val) {
        return dateUtil.dateSTimeFormat(val);
      },
      dateFormat(val) {
        return dateUtil.dateFormat(val);
      },
    },
  }
</script>
<style scoped >
  .detail{
    margin-bottom: 10px;
    width: 50%;
  }
  .detail img{
      width: 60px;
  }
</style>
